package com.ui.adapter;import java.util.HashMap;import java.util.HashSet;import java.util.Map;import java.util.Set;import java.util.Stack;public class Recycler<K, V> {		Map<K, V> mUsing = new HashMap<K, V>();	Stack<V> mFree = new Stack<V>();	public Set<K> getUsingKeySet(){		return new HashSet<K>(mUsing.keySet());	}		public boolean isUsing(K key){		return mUsing.containsKey(key);	}		public V getUsing(K key){		return mUsing.get(key);	}		public V getFree(){		if(mFree.isEmpty()){			return null;		}		return mFree.pop();	}	public void pushUsing(K key, V value){		mUsing.put(key, value);	}		public void changeFree(K key){		V value = mUsing.remove(key);		if(value != null){			mFree.push(value);		}	}		public void recycleUsing(){		mFree.addAll(mUsing.values());		mUsing.clear();	}		public void clear(){		mFree.clear();		mUsing.clear();	}}